<template>


    <div>
        <div class="goods-item" v-for="order in OrderList" :key="order.orderNumber">


            <div style="display: flex">
                <img :src="order.goodsPicture" class="order-picture">
                <div style="width:80%">
                    <div class="van-ellipsis">{{order.description}}</div>
                    <div class="order-price">￥{{order.price}}</div>
                    <div>订单号：{{order.id}}</div>
                </div>
            </div>

            <van-steps :active="order.active">
                <van-step>买家下单</van-step>
                <van-step>交易中</van-step>
                <van-step>交易完成</van-step>
            </van-steps>


        </div>
    </div>


</template>

<script>
    import Vue from 'vue';
    import {List} from 'vant';

    Vue.use(List);
    import {Step, Steps} from 'vant';
    import {ApiService} from "../../axios/apiService";

    Vue.use(Step);
    Vue.use(Steps);
    export default {
        name: "ResellOrderSpeed",
        data() {
            return {
                active: 1,
                OrderList: [],
            };
        },
        mounted() {
            this.getResellOrderSpeed()
        },
        methods: {
            getResellOrderSpeed(){
                console.log("获取订单列表")

                const getResellOrder = new ApiService("/getResellOrderSpeed")
                getResellOrder.getViewById(getResellOrder.getCookie("userid")).then(
                    res=>{
                        console.log("处理后端返回数据")
                        console.log(res.data)
                        this.OrderList = res.data

                    }
                )
            }
        }
    }
</script>

<style scoped>
    .Confirm-Receipt-Button{
        width: 100%;
        border: none;
        background: lightgrey;
        color: black;
        height: 29px;
        font-size: 15px;
        font-weight: 600;
    }
    .order-picture{
        width: 65px;
    }
    .order-price{
        color: #bd2c00;
        font-size: larger;
        font-weight: 600;
    }
</style>